import defaultSettings from '@/settings'
export const baseMixin = {
  data() {
    return {
      curPageBtnPerm: [],
      // 查询参数
      queryParams: {
        current: 1,
        limit: 10,
        orderByColumn: '',
        isAsc: 'asc',
        dictName: '',
        dictType: '',
        status: '',
        beginTime: '',
        endTime: ''
      },
    };
  },
  mounted() {
    //console.log('加载按钮权限',this.curPageBtnPerm)
    this.$store.dispatch("PutBtnList", this.curPageBtnPerm)
  },
  methods: {
    downloadFile(fileId){
      console.log('downloadFile')
      // let url = `${(defaultSettings.ctx.authorityApp == '' ? 'authority-app' : defaultSettings.ctx.authorityApp)}/s/common/tempDownload?fileId=${fileId}`;
      let url = `${(defaultSettings.ctx.authorityApp == '' ? 'authority-app' : defaultSettings.ctx.authorityApp)}/s/download?fileId=${fileId}`;
      window.location.href = url;
    }
  }
}
